package com.booth.manage.controllers;

import com.ckeditor.CKEditorConfig;
import com.ckeditor.EventHandler;
import com.ckeditor.GlobalEventHandler;
/**
 * html编辑器帮助类
 */
public class CKEditorHelper {
	public static CKEditorConfig createConfig()
	{
		CKEditorConfig settings = new CKEditorConfig();
		settings.addConfigValue("width","900");
		settings.addConfigValue("height","400");
		settings.addConfigValue("toolbar", "Full");
		settings.addConfigValue("filebrowserImageUploadUrl", "../../ckeditor/imageUpload?type=Image");//上传图片
	    settings.addConfigValue("filebrowserUploadUrl", "../../ckeditor/imageUpload?type=File");// 上传文件
	    settings.addConfigValue("filebrowserFlashUploadUrl", "../../ckeditor/imageUpload?type=Flash");//上传flash
		return settings;
	}
	public static EventHandler createEventHandlers() 
	{
		EventHandler handler = new EventHandler();
		return handler;
	}
 
	public static GlobalEventHandler createGlobalEventHandlers()
	{
		GlobalEventHandler handler = new GlobalEventHandler();
		return handler;
	}
}
